<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script src='js/vue1.0.js'></script>
	<script type='text/javascript'>

			window.onload=function(){		
				  var vm=new Vue({
                      el:'#box',
                      data:{
  						arr:['one','two','three'],
  						json:{a:'one',b:'two'},
  						ara:[{'a':1,'b':2}],
                      },
				  });

			}

	</script>
</head>
<body>
   <div id="box">
      <!-- 遍历数组和JSON三种方式 -->
            <ul>
               <!--遍历数组  {{$index}}只在vue1.0中有效 -->
            	<li v-for='value in arr'>
            	   {{value}}   {{$index}}
            	</li> 
            </ul>
                  <hr>
            <ul>
               <!-- 遍历json-->
            	<li v-for='item in json'>
            	   {{item}}  {{$index}}  {{$key}}
            	</li> 
            </ul>
                  <hr>
            <ul>
               <!-- 遍历json arr快捷方式-->
            	<li v-for='(k,v) in json'>
            	   {{k}}   {{v}}  {{$index}}
            	</li> 
            </ul>
                 <hr>
            <ul>
            
            	<li v-for='(k,v) in ara'>
            	   {{k}}   {{v.b}}  {{$index}}
            	</li> 
            </ul>
   </div>
</body>
</html>